Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tudo que estiver relacionado a tratamento de dados, Power Query editor e linguagem M
#57357
Amigos,

Estou fazendo uma consulta ao WS da Receita e tenho o limite de 03 consultas por minuto.
Se eu tiver um delay de 20 segundos entre as consultas, terei consumido exatamente as 03 consultas.
Tentei com o InvokeAfter, mas não estou conseguindo a sintaxe que funcione.
Tá escrito assim:

(CNPJ as text) =>

let
Fonte = Json.Document(Web.Contents("https://www.receitaws.com.br/v1/cnpj/"& CNPJ))
in
Fonte

Alguém pode me ajudar?
#57360
Veja se ajuda (ver anexo feito no Excel, mas tb pode ser feito no PowerBI).
Código: Selecionar todos
(CNPJ as text) =>

let
Fonte = () => Json.Document(Web.Contents("https://www.receitaws.com.br/v1/cnpj/"& CNPJ)),
delay = Function.InvokeAfter(Fonte, #duration(0,0,0,20))
in
delay
Você não está autorizado a ver ou baixar esse anexo.
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord